package org.example.yunshu.demos.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.yunshu.demos.model.Message;
import org.example.yunshu.demos.model.ResponseMessage;

import java.util.List;

@Mapper
public interface MessageMapper {

    String getLastMessage(@Param("sessionId") Integer sessionId);

    List<Message> getHistoryMessage(@Param("sessionId") Integer sessionId);

    int insertMessage(ResponseMessage responseMessage);

    void removeMessage(@Param("sessionId") Integer sessionId);
}
